package com.feiyuan.core.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 后台管理员
 * @author Xupf
 */
@Data
@TableName("admin_user")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="AdminUser对象", description="后台管理员表")
public class AdminUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "账号")
    private String userName;
    @ApiModelProperty(value = "密码")
    private String password;
    @ApiModelProperty(value = "真实姓名")
    private String name;
    @ApiModelProperty(value = "联系电话")
    private String phone;
    @ApiModelProperty(value = "联系邮箱")
    private String email;
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 关联角色
     */
    @TableField(exist = false)
    private List<Long> roleIds;
    /**
     * 对应的角色
     */
    @TableField(exist = false)
    private List<String> roles;
    /**
     * 对应的权限
     */
    @TableField(exist = false)
    private List<String> perms;
}
